package com.alcj.controller;

import com.alcj.service.UserService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @author :wangpf
 * @version :v1.0
 * @Package :com.alcj.controller
 * @Description :${TODO}(年检介绍)
 * @date :2017/9/25 0005 上午 11:10
 */
@Controller
@RequestMapping("/introduction")
public class introductionController {

    private final Logger logger = LoggerFactory.getLogger(this.getClass());

    /*
    *   http://localhost:8080/hello?name=cn.7player
     */
    @Autowired
    UserService userService;
    @RequestMapping("/init")
    public String greeting(@RequestParam(value="name", required=false, defaultValue="World") String name, Model model) {
        //User user=userService.getSuer();
        logger.trace("I am trace log.");
        logger.debug("I am debug log.");
        logger.warn("I am warn log.");
        logger.error("I am error log.");
        logger.info("hello sadsadasdasd");
        //JSONObject result = SendServerUtil.getAccessToken();
        //model.addAttribute("name", result.getString("token"));
        return "introduction";
        /*model.addAttribute("name", "sadsadsadsa");
        return "hello";*/
    }
}
